package com.syni.mdd.sjb.common.datatreaure.controller.protect.dataTreasure.news;

import com.syni.mdd.sjb.common.component.utils.common.annotations.CheckUserIdentity;
import com.syni.mdd.sjb.common.datatreaure.entity.vo.rq.apiAppNews.BankNewsRqVo;
import com.syni.mdd.sjb.common.datatreaure.service.DxshAppNewsService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/databank/news")
@Log4j2
public class BankNewsController {

    @Autowired
    DxshAppNewsService dxshAppNewsService;


    @PostMapping("/getBusinessPayData")
    @ApiOperation(value = "获取觅东东账号消息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "newId",value = "消息id")})
    @CheckUserIdentity
    public Map<String,Object> getBusinessPayData(@RequestBody @Validated BankNewsRqVo bankNewsRqVo){
        return dxshAppNewsService.getBusinessPayData(bankNewsRqVo);
    }

    @PostMapping("/confirmUidNews")
    @ApiOperation(value = "确认支付宝uid消息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "newId",value = "消息id")})
    @CheckUserIdentity
    public Map<String,Object> confirmUidNews(@RequestBody @Validated BankNewsRqVo bankNewsRqVo){
        return dxshAppNewsService.confirmUidNews(bankNewsRqVo);
    }

}
